package homework;

import java.util.ArrayList;
import java.util.Random;

public class homework3RandomNum {
	public static void main(String[] args){
		ArrayList<Integer> list = new ArrayList<Integer>();
		Random rd = new Random();
		
		for(int i = 0;i < 6;i++){
			int num = rd.nextInt(33) + 1;
			if (!findNum(num, list)){
				list.add(num);
			}
		}
		System.out.println(list);
	}
	
	public static boolean findNum(int num, ArrayList<Integer> list){
		boolean result = false;
		for(int i = 0;i < list.size() ; i++){
			if(num == list.get(i)){
				result = true;
			}
		}
		return result;
	}
}
